﻿using System;

using System.Collections.Generic;
using System.Text;

namespace gpsmid_wince.util {
	class WayDescription {
		public String description;
		public int maxScale;
		public int maxTextScale;
		public int maxOnewayArrowScale;
		public int maxDescriptionScale;
		public int lineColor;
		public int wayDescFlags;
		public int boardedColor;
		public bool isArea;
		public sbyte wayWidth;
		public bool hideable;
		public sbyte overviewMode;
		public sbyte routeFlags;
		//#if polish.api.osm-editing
		public String[] osmTags;
		//#endif

		// line styles
		public const int WDFLAG_LINESTYLE_SOLID = 0x00;  // same as Graphics.SOLID
		public const int WDFLAG_LINESTYLE_DOTTED = 0x01; // same as Graphics.DOTTED;
		public const int WDFLAG_LINESTYLE_RAIL = 0x02;
		public const int WDFLAG_LINESTYLE_STEPS = 0x04;
		public const int WDFLAG_LINESTYLE_POWERLINE = 0x08;
		public const int WDFLAG_BUILDING = 0x10;
		public const int WDFLAG_HIGHWAY_LINK = 0x20;
		public const int WDFLAG_MOTORWAY = 0x40;

		public int getGraphicsLineStyle() {
			return wayDescFlags & 0x01;
		}

		public bool isLineStyleRail() {
			return (wayDescFlags & WDFLAG_LINESTYLE_RAIL) > 0;
		}

		public bool isLineStyleSteps() {
			return (wayDescFlags & WDFLAG_LINESTYLE_STEPS) > 0;
		}

		public bool isLineStylePowerLine() {
			return (wayDescFlags & WDFLAG_LINESTYLE_POWERLINE) > 0;
		}

		public bool isBuilding() {
			return (wayDescFlags & WDFLAG_BUILDING) > 0;
		}

		public bool isHighwayLink() {
			return (wayDescFlags & WDFLAG_HIGHWAY_LINK) > 0;
		}

		public bool isMotorway() {
			return (wayDescFlags & WDFLAG_MOTORWAY) > 0;
		}

	}
}
